<template>
  <div class="modal-tips" transition="modal">
    <div class="closeDiv"><button type="button" class="close" @click="closeFn()"> &times;</button></div>
    <slot name="contenter">body</slot>
  </div>
</template>
<script type="text/ecmascript-6">
  export default{
    methods:{
      closeFn(){
        this.$emit("close");
      }
    }
  }
</script>
<style lang="less">
  .modal-tips {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 100;
    height: 60px;
    padding: 20px;
    line-height: 20px;
    width: auto;
    margin-top: -30px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .5);
    background-color: #fff;
    color: #ff0000;
    font-size: 20px;
    .closeDiv {
      position: relative;
      .close {
        position: absolute;
        top: -40px;
        right: -40px;
        width: 40px;
        height: 40px;
        border: 0;
        font-size: 22px;
        background-color: #d2d2d2;
        padding: 6px;
        color: #838383;
        cursor: pointer;
        border-radius: 40px;
        filter: alpha(opacity=60);
        opacity: .6;
      }
      .close:hover, .close:focus {
        filter: alpha(opacity=100);
        opacity: 1;
      }
    }
  }
  @media screen and (max-width: 1200px) {
    .conMain .modal-tips {
      margin-left: -300px !important;
      font-size: 16px;
      padding: 13px;
      height: 45px;
    }
    .modal-tips .closeDiv .close {
      top: -24px;
      right: -24px;
      width: 26px;
      height: 26px;
      font-size: 22px;
      line-height: 14px;
      padding: 0;
    }
  }
  @media screen and (max-width: 900px) {
    .conMain .modal-tips {
      margin-left: -200px !important;
      font-size: 14px;
      padding: 10px;
      height: 39px;
    }
    .modal-tips .closeDiv .close {
      top: -19px;
      right: -20px;
      width: 23px;
      height: 23px;
      font-size: 20px;
      line-height: 17px;
      padding: 0;
    }
  }
</style>
